export default {
  // Global page headers: https://go.nuxtjs.dev/config-head
  head: {
    title: 'supremo-maje-chris',
    htmlAttrs: {
      lang: 'en'
    },
    meta: [
      { charset: 'utf-8' },
      { name: 'viewport', content: 'width=device-width, initial-scale=1' },
      { hid: 'description', name: 'description', content: 'supremo maje nuxt demo' }
    ],
    link: [
      { rel: 'icon', type: 'image/x-icon', href: '/niulaiyunzhuan.png' }
    ]
  },

  // Global CSS: https://go.nuxtjs.dev/config-css
  css: [
    'element-ui/lib/theme-chalk/index.css'
  ],

  // Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
  plugins: [
    '@/plugins/element-ui'
  ],

  // Auto import components: https://go.nuxtjs.dev/config-components
  components: true,

  // Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
  buildModules: [
  ],

  // Modules: https://go.nuxtjs.dev/config-modules
  modules: [
    '@nuxtjs/axios'
  ],

  axios: {
    // baseURL: 'http://localhost:8210'
    proxy: true,
    prefix: '/api'
  },

  proxy: {
    '/api': {
      target: 'http://192.168.1.18:8210',
      pathRewrite: {
        '^/api': '/',
        changeOrigin: true
      }
    }
  },

  publicRuntimeConfig: {
    axios: {
      // baseURL: 'http://localhost:8210',
      browserBaseURL: process.env.BROWSER_BASE_URL
    }
  },

  privateRuntimeConfig: {
    axios: {
      baseURL: process.env.BASE_URL
    }
  },

  server: {
    // 设置成 0.0.0.0 监听所有的网卡地址
    host: '0.0.0.0', // 访问地址 default localhost
    port: 3366       // 端口号 port
  },

  // Build Configuration: https://go.nuxtjs.dev/config-build
  build: {
    transpile: [/^element-ui/],
    vendor: ['axios']
  }
}
